﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using TripLOA.WebService.Wrappers;

namespace TripLOA.WebService.Serializable
{
    [DataContract]
    public class WSUserProfile : WSObject
    {
         #region Costructors

        /// <summary>
        /// Parameterless Costructor. Set status to "fail"
        /// </summary>
        public WSUserProfile()
            : this("fail")
        { }

        /// <summary>
        /// Default Costructor. Set status to given value
        /// </summary>
        /// <param name="status">Status string, accepted values are "ok" or "fail"</param>
        public WSUserProfile(string status)
        {
            this.Status = status;
            this.Payload = new List<ProfileInfo>();
        }

        /// <summary>
        /// Constructor. Adds a ProfileInfo object to the payload
        /// </summary>
        /// <param name="status"></param>
        /// <param name="gt"></param>
        public WSUserProfile(string status, ProfileInfo gt)
            : this(status)
        {
            this.Payload.Add(gt);
        }

        #endregion

        #region Properties

        /// <summary>
        /// Payload contains a ProfileInfo object
        /// </summary>
        [DataMember]
        public List<ProfileInfo> Payload { get; set; }

        #endregion
    }
}
